package org.bigk.invoices.actions.invoices;

import java.util.Map;

import org.bigk.invoices.Globals;
import org.bigk.invoices.model.Invoice;

import com.opensymphony.xwork2.ActionContext;

public class InvoicesActionHelper {
	
	public static void storeInvoiceInSession(Invoice invoice) {
		Map<String, Object> session = ActionContext.getContext().getSession();
		session.put(Globals.SP_INVOICE, invoice);
	}

	public static Invoice retrieveInvoiceFromSession() {
		Map<String, Object> session = ActionContext.getContext().getSession();
		return (Invoice) session.get(Globals.SP_INVOICE);
	}
}
